<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @property bool $status 状态:1=待发货,2=待收货,3=待评价,4=已完成
 * @property int $address_id 地址
 * @property int $goods_id 商品
 * @property int $id
 * @property int $num 数量
 * @property int $score 支付积分
 * @property int $sku_id 规格
 * @property int $users_id 用户
 * @property string $createtime
 * @property string $express 快递公司
 * @property string $mark 订单备注
 * @property string $order_sn 订单编号
 * @property string $waybill 运单号
 * @property-read \app\model\Address $address
 * @property-read \app\model\ScoreGoods $goods
 * @mixin \think\Model
 */
class ScoreGoodsOrders extends Model
{
    protected $createTime = 'createtime';

    function goods()
    {
        return $this->belongsTo(ScoreGoods::class,'goods_id');
    }

    function address()
    {
        return $this->belongsTo(Address::class,'address_id');
    }
	
	function sku()
	{
		return $this->belongsTo(ScoreGoodsSku::class,'sku_id');
	}
}
